home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 November / PCWorld_2006-11_cd.bin / domacnost a kancelar / easytime / ETT.exe / reports / xslt / SummaryTimesheetGroupByTask.xsl < prev   
Extensible Markup Language  |  2006-08-18  |  3KB  |  93 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="html" indent="yes"/>
  4.     <xsl:template match="/">
  5.         <html>
  6.             <head>
  7.                 <link rel="stylesheet" type="text/css" href="style.css"></link>    
  8.             </head>
  9.             <xsl:apply-templates select="/Report/HeaderInfo"/>
  10.             <xsl:apply-templates select="/Report/Customer"/>
  11.             <xsl:apply-templates select="/Report/Total"/>
  12.         </html>
  13.     </xsl:template>
  14.     
  15.     <!-- ╨Æ╨╡╤Ç╤à╨╜╨╕╨╣ ╨╖╨░╨│╨╛╨╗╨╛╨▓╨╛╨║  -->
  16.     <xsl:template match="HeaderInfo">
  17.         <table align="center" width="80%">
  18.             <tr>
  19.                 <td class="TableSB">
  20.                     <table class="TableSB" width="100%" cellpadding="2" cellspacing="0" >
  21.                         <tr>
  22.                             <td colspan="2" align="center" class="ReportTitleClass"><xsl:value-of select="/Report/@Type"/></td>
  23.                         </tr>
  24.  
  25.                         <xsl:if test="Date">  <!--╨ò╤ü╨╗╨╕ ╤Å╨▓╨╜╨╛ ╨▓╤ï╨▒╤Ç╨░╨╜ ╨┤╨╕╨░╨┐╨░╨╖╨╛╨╜ ╨┤╨░╤é  -->
  26.  
  27.                         
  28.                             <tr>
  29.                                 <td colspan="2" align="right" class="Date">Date range: <xsl:value-of select="Date/From"/> - <xsl:value-of select="Date/To"/></td>
  30.                             </tr>
  31.  
  32.                         </xsl:if>
  33.                     </table>
  34.                 </td>
  35.             </tr>
  36.         </table>
  37.     </xsl:template>
  38.     
  39.     <xsl:template match="Customer">
  40.         <!-- ╨í╨┐╨╕╤ü╨╛╨║ tak'╨╛╨▓ -->
  41.         <table align="center" width="80%">
  42.             <tr>
  43.                 <td class="CompanyName"><xsl:value-of select="@Name"/></td>
  44.             </tr>
  45.         
  46.             <xsl:for-each select="Project">
  47.             <!--    <xsl:if test="SubTotal != "0:00""> -->
  48.                 <table align="center" width="80%">
  49.                     <tr>
  50.                         <td valign="top" class="ProjectName" colspan="2">Project: <span class="Pname"><xsl:value-of select="@Name"/></span></td>
  51.                     </tr>
  52. <tr><td class="ProjectName">Tasks:</td></tr>
  53.                     <xsl:for-each select="Task">
  54.  
  55.                         <tr>
  56.                             <td width="85%" valign="top" class="DetailRowDataClass"><xsl:value-of select="@Name"/></td>
  57.                             <td width="15%" valign="top" class="DetailRowDataClass1"><xsl:value-of select="@Hours"/></td>
  58.                         </tr>
  59.                     </xsl:for-each>
  60.                     <tr>
  61.                         <td width="85%" valign="top" class="SubTotal">Sub-total: </td>
  62.                         <td width="15%" valign="top" class="DetailRowDataClass2"><xsl:value-of select="SubTotal"/></td>
  63.                     </tr>
  64.                 </table>
  65.             </xsl:for-each>
  66.         </table>
  67.     </xsl:template>
  68.     
  69.     <xsl:template match="Companies/Company">
  70.      <xsl:value-of select="text()"/>
  71.      <xsl:if test="following-sibling::*/text()">, </xsl:if>
  72.     </xsl:template>
  73.     
  74.     <xsl:template match="Projects/Project">
  75.      <xsl:value-of select="text()"/>
  76.       <xsl:if test="following-sibling::*/text()">, </xsl:if>
  77.    </xsl:template>
  78.  
  79.    <xsl:template match="Tasks/Task">
  80.        <xsl:value-of select="text()"/>
  81.        <xsl:if test="following-sibling::*/text()">, </xsl:if>
  82.    </xsl:template>
  83.    
  84.    <xsl:template match="/Report/Total">
  85.     <table align="center" width="80%">
  86.     <tr>
  87.         <td width="85%" class="Total">Total:</td>
  88.         <td class="Total"><xsl:value-of select="text()"/></td>
  89.     </tr>
  90.     </table>
  91.    </xsl:template>
  92.     
  93. </xsl:stylesheet>